﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame1.GameComponents
{
    class RandomRoomGenerator
    {
        Random rand_paul = new Random();
        
        public Room GenerateRoom(int DM_RAGE)
        {
            Room myroom = new Room();
            {
                for (int i = 0; i < DM_RAGE; i++)
                {
                    if (rand_paul.Next(3) == 1)
                    {
                        //spawn an enemy
                        int num_enemy_types = 2;
                        int enemy_type = rand_paul.Next(num_enemy_types);
                        if (enemy_type == 0)
                        {
                            myroom.AddEnemy(new RunEnemy());
                        }
                        else if (enemy_type == 1)
                        {
                            myroom.AddEnemy(new LordEnemy());
                        }
                        else if (enemy_type == 2)
                        {
                            myroom.AddEnemy(new WizRobeEnemy());
                        }
                    }
                }
            }

            return myroom;
        }
    }
}
